package com.lz.spring.cloud.gateway;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.cloud.client.SpringCloudApplication;
import org.springframework.cloud.netflix.zuul.EnableZuulProxy;
import org.springframework.context.annotation.Bean;

import com.lz.spring.cloud.gateway.filter.AccessFilter;

/**
 * 应用启动入口类
 * @author likejian
 *
 */
@SpringCloudApplication
@EnableZuulProxy
public class Application {

	protected static Logger LOGGER = LoggerFactory.getLogger(Application.class);
	
	public static void main(String[] args) throws Exception {
		LOGGER.info("=====开始启动=====");
		SpringApplication.run(Application.class, args);
		LOGGER.info("=====启动完成=====");
	}
	
	@Bean
	public AccessFilter accessFilter() {
		return new AccessFilter();
	}
}
